(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/uni-number-box/uni-number-box" ], {
    "944b": function(t, e, n) {
        Object.defineProperty(e, "__esModule", {
            value: !0
        }), e.default = void 0;
        var i = {
            name: "UniNumberBox",
            props: {
                value: {
                    type: Number,
                    default: 1
                },
                min: {
                    type: Number,
                    default: 1
                },
                max: {
                    type: Number,
                    default: 9999
                },
                step: {
                    type: Number,
                    default: 1
                },
                disabled: {
                    type: Boolean,
                    default: !1
                },
                currentSkuPrice: {
                    type: Object,
                    default: function() {
                        return {};
                    }
                },
                goodsInfo: {
                    type: Object,
                    default: function() {
                        return {};
                    }
                }
            },
            computed: {},
            data: function() {
                return {
                    inputValue: 0
                };
            },
            watch: {
                value: function(t) {
                    this.inputValue = +t;
                },
                inputValue: function(t, e) {
                    +t != +e && this.$emit("change", t);
                },
                currentSkuPrice: function(t) {
                    "{}" !== JSON.stringify(t) && this.inputValue >= t.stock && (this.inputValue = t.stock);
                }
            },
            created: function() {
                this.inputValue = +this.value;
            },
            methods: {
                _calcValue: function(t) {
                    var e = this;
                    if (!this.disabled) {
                        var n = this._getDecimalScale(), i = this.inputValue * n, u = this.step * n;
                        if ("minus" === t) {
                            if ((i -= u) < this.min) return;
                            i > this.max && (i = this.max);
                        } else if ("plus" === t) {
                            if ("{}" !== JSON.stringify(e.currentSkuPrice) && i >= e.currentSkuPrice.stock) return void e.$tools.toast("库存不足");
                            if ("seckill" === e.goodsInfo.activity_type) {
                                t = e.goodsInfo.activity.rules;
                                if (0 != t.limit_buy && i >= t.limit_buy) return void e.$tools.toast("本次活动最多购买" + t.limit_buy + "件");
                            }
                            if ((i += u) > this.max) return;
                            i < this.min && (i = this.min);
                        }
                        this.inputValue = String(i / n);
                    }
                },
                _getDecimalScale: function() {
                    var t = 1;
                    return ~~this.step !== this.step && (t = Math.pow(10, (this.step + "").split(".")[1].length)), 
                    t;
                },
                _onBlur: function(t) {
                    t = t.detail.value;
                    t && ((t = +t) > this.max ? t = this.max : t < this.min && (t = this.min), this.inputValue = t);
                }
            }
        };
        e.default = i;
    },
    be69: function(t, e, n) {
        n.r(e);
        var i, u = n("d563"), o = n("cd65");
        for (i in o) "default" !== i && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(i);
        n("e81b");
        var a = n("f0c5"), u = Object(a.a)(o.default, u.b, u.c, !1, null, "78abf11d", null, !1, u.a, void 0);
        e.default = u.exports;
    },
    cd65: function(t, e, n) {
        n.r(e);
        var i, u = n("944b"), o = n.n(u);
        for (i in u) "default" !== i && function(t) {
            n.d(e, t, function() {
                return u[t];
            });
        }(i);
        e.default = o.a;
    },
    d563: function(t, e, n) {
        n.d(e, "b", function() {
            return i;
        }), n.d(e, "c", function() {
            return u;
        }), n.d(e, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, u = [];
    },
    e7d4: function(t, e, n) {},
    e81b: function(t, e, n) {
        var i = n("e7d4");
        n.n(i).a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/uni-number-box/uni-number-box-create-component", {
    "components/uni-number-box/uni-number-box-create-component": function(t, e, n) {
        n("543d").createComponent(n("be69"));
    }
}, [ [ "components/uni-number-box/uni-number-box-create-component" ] ] ]);